<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            background: red;
        }
        p {
            width: 200px;
            height: 200px;
            background: yellow;
        }
    </style>
    <script src="js/jquery-3.2.1.min.js"></script>
    <script>
        $(function () {
            $('p').click(function (event) {
//                event.stopPropagation();   //阻止了事件冒泡 但是没有阻止默认行为
                console.log('我是p');
                return false;                // 阻止了事件冒泡 同时也阻止了默认行为
            })
            $('div').click(function () {
                console.log('我是div');
            })
        })
    </script>
</head>
<body>
<div>
    <p></p>
</div>
</body>
</html>